export const getType = (path, pageType = 'list') => {
    // mine: 我的offer  company: offer管理
    let type = '';
    if (pageType === 'list') {
        if (path === '/office/personnelManagement/recruit/offer') {
            type = 'company';
        } else if (path === '/personal/portal/recruit/offer') {
            type = 'mine';
        } else {
            throw new Error('未找到路径！请检查');
        }
    } else if (pageType === 'detail') {
        if (
            path === '/office/personnelManagement/recruit/offer/detail' ||
            path === '/office/personnelManagement/recruit/offer/detail/print'
        ) {
            type = 'company';
        } else if (path === '/personal/portal/recruit/offer/detail') {
            type = 'mine';
        } else {
            throw new Error('未找到路径！请检查');
        }
    } else {
        throw new Error(`没有${pageType}类型！`);
    }

    return type;
};
